
#ifndef monster_H_
#define monster_H_

#include <stdio.h>
#include <stdlib.h>
#include "SDL.h"
#include "SDL_image.h"
#include "../include/constant.h"

enum e_way_monster{
	NORTH_MONSTER =0, SOUTH_MONSTER, WEST_MONSTER, EAST_MONSTER
};


typedef struct s_monster * t_monster;


// Creates a new monster
extern t_monster monster_init(void);
extern void monster_free(t_monster monster);


// Returns the current position of the monster
extern int monster_get_x(t_monster monster);
extern int monster_get_y(t_monster monster);

// Set the direction of the next move of the monster
extern void monster_set_current_way(t_monster monster, enum e_way_monster way);


// Load the monster position from the map
extern void monster_from_map(t_monster monster, t_map map);

// Move the monster according to the current direction
extern int monster_move(t_monster monster, t_map map);

// Display the monster on the screen
extern void monster_display(t_monster monster, SDL_Surface *screen);

//Generate aleatoire position of monster
int aleatoire_way(void);

#endif /* monster_H_ */
